package cn.wolfcode.trip.base.mapper;

import cn.wolfcode.trip.base.domain.Strategy;
import cn.wolfcode.trip.base.query.StrategyQueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface StrategyMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Strategy record);

    Strategy selectByPrimaryKey(Long id);

    List<Strategy> selectAll();

    int updateByPrimaryKey(Strategy record);

    List<Strategy> selectForList(StrategyQueryObject qo);

    List<Strategy> listByState(StrategyQueryObject qo);

    /**
     * admin 删除攻略游记
     * @param id
     */
    void deleteStrategyTravel(Long id);

    /**
     * admin 添加攻略游记
     * @param strategyId
     * @param travelId
     * @param count
     */
    void saveStrategyTravel(@Param("strategyId") Long strategyId, @Param("travelId") Long travelId, @Param("count") Integer count);

    List<Map<String,Object>> selectTagsByStrategyId(Long strategyId);

}